package com.openthinks.joyniproject.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.openthinks.joyniproject.dao.BaseDao;
import com.openthinks.joyniproject.dao.RoleDao;
import com.openthinks.joyniproject.model.Role;
import com.openthinks.joyniproject.utils.SQLConfigLoader;

/**
 * 角色Dao 实现
 * @since 
 *		v1.0
 * @version
 * 		v1.0, 2013-06-28 21:53:49
 * @author 
 *		Cloud
 */
@Repository
public class RoleDaoImpl implements RoleDao{

	@Autowired
	private BaseDao baseDao;

	@Override
	public List<Role> findAll() {
		
		String sql = SQLConfigLoader.getSQL("Role.findAll");
		Map<String, Object> paramMap = new HashMap<String, Object>();
		return baseDao.queryObjectForList(sql, Role.class, paramMap);
	}
}
